home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Celestin Apprentice 5
/
Apprentice-Release5.iso
/
Source Code
/
C
/
Frameworks
/
TransSkel 3.24
/
Source
/
Dialog Item Stuff
/
SkelSetRadio.c
< prev
next >
Wrap
Text File
|
1996-01-17
|
489b
|
23 lines
/*
* Given a set of contiguous radio button dialog items, turn one of them
* on and all others off.
*/
# include "TransSkel.h"
pascal void
SkelSetDlogRadioButtonSet (DialogPtr dlog, short first, short last, short choice)
{
ControlHandle ctrl;
short i, value;
for (i = first; i <= last; i++)
{
value = (i == choice ? 1 : 0);
ctrl = SkelGetDlogCtl (dlog, i);
if (GetControlValue (ctrl) != value) /* don't set unless it's different! */
SetControlValue (ctrl, value);
}
}